export function assertResCode() {
    assertStatus200()

    client.test("response assert code==0", function () {
        let code = response.body.code
        client.assert(code == 0, `Response code is ${code}`);
    });
}

export function assertResErrorCode() {
    assertStatus200()
    client.test("response assert code==1", function () {
        let code = response.body.code
        client.assert(code == 1, `Response code is ${code}`);
    });
}


export function assertStatus200() {
    client.test("response assert code==1", function () {
        let status = response.status
        client.assert(status === 200, `Response status is ${status}`);
    });
}

